Skip to content

Reuse doc completion, hover, and definition for @see #698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

taminomara
Copy link
Contributor

This PR improves handling of @see contents by reusing machinery introduced for parsing documentation comments. The behaviour is backwards-compatible with the old syntax (@see class#member).

To avoid code duplication, I've adjusted TkDocSeeContent to only include symbols that are valid in cross-references. The rest is pushed into Description, which was already present in AST, but remained empty due to TkDocSeeContent consuming the entire line.

Fix #671

This PR improves handling of `@see` contents by reusing machinery introduced
for parsing documentation comments. The behaviour is backwards-compatible
with the old syntax (`@see class#member`).

To avoid code duplication, I've adjusted `TkDocSeeContent` to only include
symbols that are valid in cross-references. The rest is pushed into
`Description`, [which was already present in AST][desc], but remained empty
due to `TkDocSeeContent` consuming the entire line.

Fix EmmyLuaLs#671

[desc]: https://github.com/EmmyLuaLs/emmylua-analyzer-rust/blob/2bb63fa4dca5ddd617b70c08f74bf11a15f2b6f8/crates/emmylua_parser/src/grammar/doc/tag.rs#L386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make syntax of @see compatible with LuaLs
1 participant